package com.zzk.protect.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

/**
 * 
 * @TableName examination_relation
 */
@TableName(value ="examination_relation")
public class ExaminationRelation {
    /**
     * Primary key ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * Examination item ID
     */
    @TableField(value = "examination_item_id")
    private Integer examinationItemId;

    /**
     * Examination template ID
     */
    @TableField(value = "examination_template_id")
    private Integer examinationTemplateId;

    /**
     * Examination body part
     */
    @TableField(value = "body_part")
    private String bodyPart;

    /**
     * Primary key ID
     */
    public Integer getId() {
        return id;
    }

    /**
     * Primary key ID
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * Examination item ID
     */
    public Integer getExaminationItemId() {
        return examinationItemId;
    }

    /**
     * Examination item ID
     */
    public void setExaminationItemId(Integer examinationItemId) {
        this.examinationItemId = examinationItemId;
    }

    /**
     * Examination template ID
     */
    public Integer getExaminationTemplateId() {
        return examinationTemplateId;
    }

    /**
     * Examination template ID
     */
    public void setExaminationTemplateId(Integer examinationTemplateId) {
        this.examinationTemplateId = examinationTemplateId;
    }

    /**
     * Examination body part
     */
    public String getBodyPart() {
        return bodyPart;
    }

    /**
     * Examination body part
     */
    public void setBodyPart(String bodyPart) {
        this.bodyPart = bodyPart;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ExaminationRelation other = (ExaminationRelation) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getExaminationItemId() == null ? other.getExaminationItemId() == null : this.getExaminationItemId().equals(other.getExaminationItemId()))
            && (this.getExaminationTemplateId() == null ? other.getExaminationTemplateId() == null : this.getExaminationTemplateId().equals(other.getExaminationTemplateId()))
            && (this.getBodyPart() == null ? other.getBodyPart() == null : this.getBodyPart().equals(other.getBodyPart()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getExaminationItemId() == null) ? 0 : getExaminationItemId().hashCode());
        result = prime * result + ((getExaminationTemplateId() == null) ? 0 : getExaminationTemplateId().hashCode());
        result = prime * result + ((getBodyPart() == null) ? 0 : getBodyPart().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", examinationItemId=").append(examinationItemId);
        sb.append(", examinationTemplateId=").append(examinationTemplateId);
        sb.append(", bodyPart=").append(bodyPart);
        sb.append("]");
        return sb.toString();
    }
}